package Interface;

import java.awt.GridBagLayout;
import javax.swing.JPanel;
import javax.swing.JSplitPane;
import java.awt.GridBagConstraints;

public class panelGauche extends JPanel {

	private static final long serialVersionUID = 1L;
	private JSplitPane jSplitPane = null;
	private PanelUnivers panelUnivers ;
	private panelOutils panelOutils  ;

	/**
	 * This is the default constructor
	 */
	public panelGauche(FrameDemo fenetre) {
		super();
		panelUnivers = new PanelUnivers(fenetre);
		panelOutils = new panelOutils(fenetre);
		initialize(fenetre);
	}

	/**
	 * This method initializes this
	 * 
	 * @return void
	 */
	private void initialize(FrameDemo fenetre) {
		GridBagConstraints gridBagConstraints = new GridBagConstraints();
		gridBagConstraints.fill = GridBagConstraints.BOTH;
		gridBagConstraints.gridy = 0;
		gridBagConstraints.weightx = 1.0;
		gridBagConstraints.weighty = 1.0;
		gridBagConstraints.gridx = 0;
		this.setSize(300, 200);
		this.setLayout(new GridBagLayout());
		this.add(getJSplitPane(), gridBagConstraints);
	}

	/**
	 * This method initializes jSplitPane	
	 * 	
	 * @return javax.swing.JSplitPane	
	 */
	private JSplitPane getJSplitPane() {
		if (jSplitPane == null) {
			
			jSplitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT,panelOutils,panelUnivers);
			jSplitPane.setDividerLocation(220);
		}
		return jSplitPane;
	}

	public PanelUnivers getPanelUnivers() {
		return panelUnivers;
	}

	public void setPanelUnivers(PanelUnivers panelUnivers) {
		this.panelUnivers = panelUnivers;
	}

	public panelOutils getPanelOutils() {
		return panelOutils;
	}

	public void setPanelOutils(panelOutils panelOutils) {
		this.panelOutils = panelOutils;
	}


}
